export const parameters = {
	TABH:[
		0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,  
		0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,  
		0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41,  
		0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,  
		0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40,  
		0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,  
		0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40,  
		0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,  
		0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,  
		0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,  
		0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40,  
		0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,  
		0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,0x80, 0x41, 0x00, 0xC1, 0x81, 0x40
	],
	TABL:[
		0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2, 0xC6, 0x06,0x07, 0xC7, 0x05, 0xC5, 0xC4, 0x04, 0xCC, 0x0C, 0x0D, 0xCD,  
		0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09,0x08, 0xC8, 0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A,  
		0x1E, 0xDE, 0xDF, 0x1F, 0xDD, 0x1D, 0x1C, 0xDC, 0x14, 0xD4,0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6, 0xD2, 0x12, 0x13, 0xD3,  
		0x11, 0xD1, 0xD0, 0x10, 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3,0xF2, 0x32, 0x36, 0xF6, 0xF7, 0x37, 0xF5, 0x35, 0x34, 0xF4,  
		0x3C, 0xFC, 0xFD, 0x3D, 0xFF, 0x3F, 0x3E, 0xFE, 0xFA, 0x3A,0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28, 0xE8, 0xE9, 0x29,  
		0xEB, 0x2B, 0x2A, 0xEA, 0xEE, 0x2E, 0x2F, 0xEF, 0x2D, 0xED,0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26,  
		0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60,0x61, 0xA1, 0x63, 0xA3, 0xA2, 0x62, 0x66, 0xA6, 0xA7, 0x67,  
		0xA5, 0x65, 0x64, 0xA4, 0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F,0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68,  
		0x78, 0xB8, 0xB9, 0x79, 0xBB, 0x7B, 0x7A, 0xBA, 0xBE, 0x7E,0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C, 0xB4, 0x74, 0x75, 0xB5,  
		0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71,0x70, 0xB0, 0x50, 0x90, 0x91, 0x51, 0x93, 0x53, 0x52, 0x92,  
		0x96, 0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C,0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E, 0x5A, 0x9A, 0x9B, 0x5B,  
		0x99, 0x59, 0x58, 0x98, 0x88, 0x48, 0x49, 0x89, 0x4B, 0x8B,0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C,  
		0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42,0x43, 0x83, 0x41, 0x81, 0x80, 0x40
	],
	SLAVE_ID:[
		{ value: 0, text: "0x00" },{ value: 1, text: "0x01" },  { value: 2, text: "0x02" },   { value: 3, text: "0x03" },   { value: 4, text: "0x04" },  { value: 5, text: "0x05" },  { value: 6, text: "0x06" },  { value: 7, text: "0x07" },  { value: 8, text: "0x08" },  { value: 9, text: "0x09" },  { value: 10, text: "0x0A" }, { value: 11, text: "0x0B" }, { value: 12, text: "0x0C" }, { value: 13, text: "0x0D" }, { value: 14, text: "0x0E" }, { value: 15, text: "0x0F" },
		{ value: 16, text: "0x10" },    { value: 17, text: "0x11" },  { value: 18, text: "0x12" },  { value: 19, text: "0x13" },  { value: 20, text: "0x14" }, { value: 21, text: "0x15" }, { value: 22, text: "0x16" }, { value: 23, text: "0x17" }, { value: 24, text: "0x18" }, { value: 25, text: "0x19" }, { value: 26, text: "0x1A" }, { value: 27, text: "0x1B" }, { value: 28, text: "0x1C" }, { value: 29, text: "0x1D" }, { value: 30, text: "0x1E" }, { value: 31, text: "0x1F" },
		{ value: 32, text: "0x20" },    { value: 33, text: "0x21" },  { value: 34, text: "0x22" },  { value: 35, text: "0x23" },  { value: 36, text: "0x24" }, { value: 37, text: "0x25" }, { value: 38, text: "0x26" }, { value: 39, text: "0x27" }, { value: 40, text: "0x28" }, { value: 41, text: "0x29" }, { value: 42, text: "0x2A" }, { value: 43, text: "0x2B" }, { value: 44, text: "0x2C" }, { value: 45, text: "0x2D" }, { value: 46, text: "0x2E" }, { value: 47, text: "0x2F" },
		{ value: 48, text: "0x30" },    { value: 49, text: "0x31" },  { value: 50, text: "0x32" },  { value: 51, text: "0x33" },  { value: 52, text: "0x34" }, { value: 53, text: "0x35" }, { value: 54, text: "0x36" }, { value: 55, text: "0x37" }, { value: 56, text: "0x38" }, { value: 57, text: "0x39" }, { value: 58, text: "0x3A" }, { value: 59, text: "0x3B" }, { value: 60, text: "0x3C" }, { value: 61, text: "0x3D" }, { value: 62, text: "0x3E" }, { value: 63, text: "0x3F" },
		{ value: 64, text: "0x40" },    { value: 65, text: "0x41" },  { value: 66, text: "0x42" },  { value: 67, text: "0x43" },  { value: 68, text: "0x44" }, { value: 69, text: "0x45" }, { value: 70, text: "0x46" }, { value: 71, text: "0x47" }, { value: 72, text: "0x48" }, { value: 73, text: "0x49" }, { value: 74, text: "0x4A" }, { value: 75, text: "0x4B" }, { value: 76, text: "0x4C" }, { value: 77, text: "0x4D" }, { value: 78, text: "0x4E" }, { value: 79, text: "0x4F" },
		{ value: 80, text: "0x50" },    { value: 81, text: "0x51" },  { value: 82, text: "0x52" },  { value: 83, text: "0x53" },  { value: 84, text: "0x54" }, { value: 85, text: "0x55" }, { value: 86, text: "0x56" }, { value: 87, text: "0x57" }, { value: 88, text: "0x58" }, { value: 89, text: "0x59" }, { value: 90, text: "0x5A" }, { value: 91, text: "0x5B" }, { value: 92, text: "0x5C" }, { value: 93, text: "0x5D" }, { value: 94, text: "0x5E" }, { value: 95, text: "0x5F" },
		{ value: 96, text: "0x60" },    { value: 97, text: "0x61" },  { value: 98, text: "0x62" },  { value: 99, text: "0x63" },  { value: 100, text: "0x64" },{ value: 101, text: "0x65" },{ value: 102, text: "0x66" },{ value: 103, text: "0x67" },{ value: 104, text: "0x68" },{ value: 105, text: "0x69" },{ value: 106, text: "0x6A" },{ value: 107, text: "0x6B" },{ value: 108, text: "0x6C" },{ value: 109, text: "0x6D" },{ value: 110, text: "0x6E" },{ value: 111, text: "0x6F" },
		{ value: 112, text: "0x70" },   { value: 113, text: "0x71" }, { value: 114, text: "0x72" }, { value: 115, text: "0x73" }, { value: 116, text: "0x74" },{ value: 117, text: "0x75" },{ value: 118, text: "0x76" },{ value: 119, text: "0x77" },{ value: 120, text: "0x78" },{ value: 121, text: "0x79" },{ value: 122, text: "0x7A" },{ value: 123, text: "0x7B" },{ value: 124, text: "0x7C" },{ value: 125, text: "0x7D" },{ value: 126, text: "0x7E" },{ value: 127, text: "0x7F" },
		{ value: 128, text: "0x80" },   { value: 129, text: "0x81" }, { value: 130, text: "0x82" }, { value: 131, text: "0x83" }, { value: 132, text: "0x84" },{ value: 133, text: "0x85" },{ value: 134, text: "0x86" },{ value: 135, text: "0x87" },{ value: 136, text: "0x88" },{ value: 137, text: "0x89" },{ value: 138, text: "0x8A" },{ value: 139, text: "0x8B" },{ value: 140, text: "0x8C" },{ value: 141, text: "0x8D" },{ value: 142, text: "0x8E" },{ value: 143, text: "0x8F" },
		{ value: 144, text: "0x90" },   { value: 145, text: "0x91" }, { value: 146, text: "0x92" }, { value: 147, text: "0x93" }, { value: 148, text: "0x94" },{ value: 149, text: "0x95" },{ value: 150, text: "0x96" },{ value: 151, text: "0x97" },{ value: 152, text: "0x98" },{ value: 153, text: "0x99" },{ value: 154, text: "0x9A" },{ value: 155, text: "0x9B" },{ value: 156, text: "0x9C" },{ value: 157, text: "0x9D" },{ value: 158, text: "0x9E" },{ value: 159, text: "0x9F" },
		{ value: 160, text: "0xA0" },   { value: 161, text: "0xA1" }, { value: 162, text: "0xA2" }, { value: 163, text: "0xA3" }, { value: 164, text: "0xA4" },{ value: 165, text: "0xA5" },{ value: 166, text: "0xA6" },{ value: 167, text: "0xA7" },{ value: 168, text: "0xA8" },{ value: 169, text: "0xA9" },{ value: 170, text: "0xAA" },{ value: 171, text: "0xAB" },{ value: 172, text: "0xAC" },{ value: 173, text: "0xAD" },{ value: 174, text: "0xAE" },{ value: 175, text: "0xAF" },
		{ value: 176, text: "0xB0" },   { value: 177, text: "0xB1" }, { value: 178, text: "0xB2" }, { value: 179, text: "0xB3" }, { value: 180, text: "0xB4" },{ value: 181, text: "0xB5" },{ value: 182, text: "0xB6" },{ value: 183, text: "0xB7" },{ value: 184, text: "0xB8" },{ value: 185, text: "0xB9" },{ value: 186, text: "0xBA" },{ value: 187, text: "0xBB" },{ value: 188, text: "0xBC" },{ value: 189, text: "0xBD" },{ value: 190, text: "0xBE" },{ value: 191, text: "0xBF" },
		{ value: 192, text: "0xC0" },   { value: 193, text: "0xC1" }, { value: 194, text: "0xC2" }, { value: 195, text: "0xC3" }, { value: 196, text: "0xC4" },{ value: 197, text: "0xC5" },{ value: 198, text: "0xC6" },{ value: 199, text: "0xC7" },{ value: 200, text: "0xC8" },{ value: 201, text: "0xC9" },{ value: 202, text: "0xCA" },{ value: 203, text: "0xCB" },{ value: 204, text: "0xCC" },{ value: 205, text: "0xCD" },{ value: 206, text: "0xCE" },{ value: 207, text: "0xCF" },
		{ value: 208, text: "0xD0" },   { value: 209, text: "0xD1" }, { value: 210, text: "0xD2" }, { value: 211, text: "0xD3" }, { value: 212, text: "0xD4" },{ value: 213, text: "0xD5" },{ value: 214, text: "0xD6" },{ value: 215, text: "0xD7" },{ value: 216, text: "0xD8" },{ value: 217, text: "0xD9" },{ value: 218, text: "0xDA" },{ value: 219, text: "0xDB" },{ value: 220, text: "0xDC" },{ value: 221, text: "0xDD" },{ value: 222, text: "0xDE" },{ value: 223, text: "0xDF" },
		{ value: 224, text: "0xE0" },   { value: 225, text: "0xE1" }, { value: 226, text: "0xE2" }, { value: 227, text: "0xE3" }, { value: 228, text: "0xE4" },{ value: 229, text: "0xE5" },{ value: 230, text: "0xE6" },{ value: 231, text: "0xE7" },{ value: 232, text: "0xE8" },{ value: 233, text: "0xE9" },{ value: 234, text: "0xEA" },{ value: 235, text: "0xEB" },{ value: 236, text: "0xEC" },{ value: 237, text: "0xED" },{ value: 238, text: "0xEE" },{ value: 239, text: "0xEF" },
		{ value: 240, text: "0xF0" },   { value: 241, text: "0xF1" }, { value: 242, text: "0xF2" }, { value: 243, text: "0xF3" }, { value: 244, text: "0xF4" },{ value: 245, text: "0xF5" },{ value: 246, text: "0xF6" },{ value: 247, text: "0xF7" },{ value: 248, text: "0xF8" },{ value: 249, text: "0xF9" },{ value: 250, text: "0xFA" },{ value: 251, text: "0xFB" },{ value: 252, text: "0xFC" },{ value: 253, text: "0xFD" },{ value: 254, text: "0xFE" },{ value: 255, text: "0xFF" },		
	],
	BAUDRATE:[
		{ value: 0, text: "600" },{ value: 1, text: "1200" },{ value: 2, text: "2400" },{ value: 3, text: "4800" },
		{ value: 4, text: "9600" },{ value: 5, text: "14400" },{ value: 6, text: "19200" },{ value: 7, text: "28800" },
		{ value: 8, text: "38400" },{ value: 9, text: "57600" },{ value: 10, text: "115200" },{ value: 11, text: "256000" }
	],
	BAUDRATE_P01:[
		{ value: 0, text: "600" },{ value: 1, text: "1200" },{ value: 2, text: "2400" },{ value: 3, text: "4800" },
		{ value: 4, text: "9600" },{ value: 5, text: "14400" },{ value: 6, text: "19200" },{ value: 7, text: "28800" },
		{ value: 8, text: "38400" },{ value: 9, text: "57600" },{ value: 10, text: "115200" }
	],
	BAUDRATE_ANALOG:[
		{ value: 0, text: "1200" },{ value: 1, text: "2400" },{ value: 2, text: "4800" },{ value: 3, text: "9600" },
		{ value: 4, text: "19200" },{ value: 5, text: "38400" },{ value: 6, text: "57600" },{ value: 7, text: "115200" },
		{ value: 8, text: "230400" },{ value: 9, text: "460800" },{ value: 10, text: "921600" },{ value: 11, text: "1843200" }
	],
	BAUDRATE_BLE:[
		{ value: 600, text: "600" },{ value: 1200, text: "1200" },{ value: 2400, text: "2400" },{ value: 4800, text: "4800" },
		{ value: 9600, text: "9600" },{ value: 14400, text: "14400" },{ value: 19200, text: "19200" },{ value: 28800, text: "28800" },
		{ value: 38400, text: "38400" },{ value: 57600, text: "57600" },{ value: 115200, text: "115200" },{ value: 256000, text: "256000" },
		{ value: 500000, text: "500000" }
	],
	STOPBIT:[
		{ "value": 0b00000000,"text": '1个停止位' },	//{ "value": 0b00000001,"text": '0.5个停止位' },	
		{ "value": 0b00000010,"text": '2个停止位' },	//{ "value": 0b00000011,"text": '1.5个停止位' },
	],
	STOPBIT_ANALOG:[		
		{ "value": 1,"text": '1位' },//{ "value": 0,"text": '0.5位' },		
		{ "value": 3,"text": '2位' }//{ "value": 2,"text": '1.5位' },
	],
	STOPBIT_BLE:[
		{ "value": 1,"text": '1个停止位' },{ "value": 2,"text": '2个停止位' }
	],
	DATABIT_BLE:[
		{ "value": 5,"text": '5' },{ "value": 6,"text": '6' },{ "value": 7,"text": '7' },{ "value": 8,"text": '8' }
	],
	CHECKOUT:[
		{ "value": 0b00000000,"text": '无校验' },{ "value": 0b00000001,"text": '偶校验' },{ "value": 0b00000010,"text": '奇校验' }	
	],
	CHECKOUT_BLE:[
		{ "value": 0,"text": '无校验' },{ "value": 1,"text": '奇校验' },{ "value": 2,"text": '偶校验' }
	],
	CONFIG_GS24:[
		{ "value": 0,"text": '遇阻重开' },{ "value": 1,"text": '失联时感应开盖' },	{ "value": 2,"text": '满桶允许开盖' },{ "value": 3,"text": '灯做满桶指示' },
		{ "value": 4,"text": '锁做满桶指示' },{ "value": 5,"text": '防夹重开' },{ "value": 6,"text": '始终允许感应' },{ "value": 7,"text": '热敏电阻' },
		{ "value": 8,"text": '失联动作' },{ "value": 9,"text": '上电关门' },{ "value": 10,"text": '防夹使能' },{ "value": 11,"text": '重量可负' },
		{ "value": 12,"text": '按钮关门' },{ "value": 13,"text": '温控联动' },{ "value": 14,"text": 'bit14' },{ "value": 15,"text": 'bit15' }
	],
	CONFIG_GS24NL:[
		{ "value": 0,"text": '遇阻重开' },{ "value": 1,"text": '防夹使能' },	{ "value": 2,"text": '防夹重开' },{ "value": 3,"text": '防夹传感器常闭' },
		{ "value": 4,"text": '定时投放' },{ "value": 5,"text": '满桶允许感应' },{ "value": 6,"text": '失联动作' },{ "value": 7,"text": '失联打开感应' },
		{ "value": 8,"text": 'bit8' },{ "value": 9,"text": '上电关门' },{ "value": 10,"text": '按钮关门' },{ "value": 11,"text": '重量可负' }		
	],
	CONFIG_GS24NH:[
		{ "value": 0,"text": '灯作满桶指示' },{ "value": 1,"text": '锁作满桶指示' },	{ "value": 2,"text": '满桶常闭' },{ "value": 3,"text": '编码器使能' }		
	],
	CONFIG_DC2405:[
		{ "value": 0,"text": '遇阻重开' },{ "value": 1,"text": 'bit1' },	{ "value": 2,"text": '满桶允许开盖' },{ "value": 3,"text": '满桶指示' },
		{ "value": 4,"text": 'bit4' },{ "value": 5,"text": 'bit5' },{ "value": 6,"text": 'bit6' },{ "value": 7,"text": '满桶信号触发' },
		{ "value": 8,"text": '双路指示' },{ "value": 9,"text": '上电关门' },{ "value": 10,"text": '关门不报' },{ "value": 11,"text": '时间细分' },
		{ "value": 12,"text": '单路触发' },{ "value": 13,"text": 'bit13' },{ "value": 14,"text": 'bit14' },{ "value": 15,"text": 'bit15' }
	],
	CONFIG_ZDBL:[
		{ "value": 0,"text": '遇阻重开' },
		{ "value": 1,"text": 'bit1' },
		{ "value": 2,"text": '满桶允许开盖' },
		{ "value": 3,"text": '开机报警' },
		{ "value": 4,"text": '电车模式' }		
	],
	SAMPLERATE_WTA01:[
		{ "value": 0b0000,"text": '10Hz' },{ "value": 0b0001,"text": '40Hz' }
	],
	SAMPLERATE_WTA02:[
		{ "value": 0b0000,"text": '2.4KHz' },{ "value": 0b0001,"text": '1.2KHz' },{ "value": 0b0010,"text": '600Hz' },{ "value": 0b0011,"text": '300Hz' },
		{ "value": 0b0100,"text": '150Hz' },{ "value": 0b0101,"text": '75Hz' },{ "value": 0b0110,"text": '37.5Hz' },{ "value": 0b0111,"text": '18.75Hz' },
		{ "value": 0b1000,"text": '10Hz' },{ "value": 0b1001,"text": '10Hz(陷波)' },{ "value": 0b1010,"text": '5Hz' },{ "value": 0b1011,"text": '5Hz(陷波)' },
		{ "value": 0b1100,"text": '2.5Hz' },{ "value": 0b1101,"text": '2.5Hz(陷波)' }
	],
	SAMPLERATE_RTD:[
		{ "value": 0b0011,"text": '300Hz' },{ "value": 0b0100,"text": '150Hz' },{ "value": 0b0101,"text": '75Hz' },{ "value": 0b0110,"text": '37.5Hz' },
		{ "value": 0b0111,"text": '18.75Hz' },{ "value": 0b1000,"text": '10Hz' },{ "value": 0b1001,"text": '10Hz(陷波)' },{ "value": 0b1011,"text": '5Hz(陷波)' },
		{ "value": 0b1101,"text": '2.5Hz(陷波)' }
	],
	MULT:[
		{ "value": 0b0000,"text": '1X' },{ "value": 0b0001,"text": '2X' },{ "value": 0b0010,"text": '4X' },{ "value": 0b0011,"text": '6X' },
		{ "value": 0b0100,"text": '8X' },{ "value": 0b0101,"text": '12X' },{ "value": 0b0110,"text": '16X' },{ "value": 0b0111,"text": '24X' },
		{ "value": 0b1000,"text": '32X' },{ "value": 0b1001,"text": '48X' },{ "value": 0b1010,"text": '64X' },{ "value": 0b1011,"text": '96X' },
		{ "value": 0b1100,"text": '128X' },{ "value": 0b1101,"text": '192X' },{ "value": 0b1110,"text": '256X' },{ "value": 0b1111,"text": '禁用' }
	],
	POLARITY:[
		{ "value": 0b0000,"text": '极性不反转' },{ "value": 0b0010,"text": '极性反转' }
	],
	WEIGHTUNIT:[
		{ "value": 0,"text": '0.01g' },{ "value": 1,"text": '0.1g' },{ "value": 2,"text": '1g' },{ "value": 3,"text": '10g' },
		{ "value": 4,"text": '100g' },{ "value": 5,"text": '1kg' },{ "value": 6,"text": '10kg' },{ "value": 7,"text": '100kg' },
	],
	WARN_WTA:[
		{ "value": 0,"text": '电流跌落' },{ "value": 1,"text": '电流过小' },{ "value": 2,"text": '电流过大' },{ "value": 3,"text": 'S+对地短路' },
		{ "value": 4,"text": 'S+开路' },{ "value": 5,"text": 'S-对地短路' },{ "value": 6,"text": 'S-开路' },{ "value": 7,"text": 'S+对E+短路' },
		{ "value": 8,"text": 'S-对E+短路' },
	],
	WARN_RTD:[
		{ "value": 0,"text": '阻值突变' },{ "value": 1,"text": '阻值过小' },{ "value": 2,"text": '阻值过大' },{ "value": 3,"text": 'S+对地短路' },
		{ "value": 4,"text": 'S+开路' },{ "value": 5,"text": 'S-对地短路' },{ "value": 6,"text": 'S-开路' },{ "value": 7,"text": 'S+对E+短路' },
		{ "value": 8,"text": 'S-对E+短路' },
	],
	WARN_P:[
		{ "value": 0,"text": '电流跌落' },{ "value": 1,"text": '电流过小' },{ "value": 2,"text": '电流过大' },{ "value": 3,"text": 'S+对地短路' },
		{ "value": 4,"text": 'S+开路' },{ "value": 5,"text": 'S-对地短路' },{ "value": 6,"text": 'S-开路' },{ "value": 7,"text": 'S+对E+短路' },
		{ "value": 8,"text": 'S-对E+短路' },
	],
	WARN_L:[
		{ "value": 0b00000000000000000000000000000001,"text": '进液温度采集错误' },
		{ "value": 0b00000000000000000000000000000010,"text": '出液和环境温度采集错误' },
		{ "value": 0b00000000000000000000000000000100,"text": '压力1未接' },
		{ "value": 0b00000000000000000000000000001000,"text": '压力2未接' },
		{ "value": 0b00000000000000000000000000010000,"text": '液位低' },
		{ "value": 0b00000000000000000000000000100000,"text": '压力大' },
		{ "value": 0b00000000000000000000000001000000,"text": '进液温度未接' },
		{ "value": 0b00000000000000000000000010000000,"text": '出液温度未接' },
		{ "value": 0b00000000000000000000000100000000,"text": '环境温度未接' },
		{ "value": 0b00000000000000000000001000000000,"text": '水泵故障' },
		{ "value": 0b00000000000000000000010000000000,"text": '风扇1故障' },
		{ "value": 0b00000000000000000000100000000000,"text": '风扇2故障' },
		{ "value": 0b00000000000000000001000000000000,"text": '风扇3故障' },
		{ "value": 0b00000000000000000010000000000000,"text": '流量故障' },
		{ "value": 0b00000000000000000100000000000000,"text": '系统流量低' },
		{ "value": 0b00000000000000001000000000000000,"text": '进液温度高' },
		{ "value": 0b00000000000000010000000000000000,"text": 'modbus失联' }
	],
	WARN_ZDBL:[
		{ "value": 0b00000000000000000000000000000001,"text": '通信'},
		{ "value": 0b00000000000000000000000000000010,"text": '过流'},
		{ "value": 0b00000000000000000000000000000100,"text": '低压'},
		{ "value": 0b00000000000000000000000000001000,"text": '过压'},
		{ "value": 0b00000000000000000000000000010000,"text": '位置'},
		{ "value": 0b00000000000000000000000000100000,"text": '刹车'},
		{ "value": 0b00000000000000000000000001000000,"text": 'IO'},
		{ "value": 0b00000000000000000000000010000000,"text": '过温'},
		{ "value": 0b00000000000000000000000100000000,"text": '低温'},
		{ "value": 0b00000000000000000000001000000000,"text": '控制'},
		{ "value": 0b00000000000000000000010000000000,"text": '参数'},		
		{ "value": 0b00000000000000010000000000000000,"text": '存储'},
		{ "value": 0b00000000000000100000000000000000,"text": 'OS' }
	],	
	RANGEMAX_RTD:[
		{ "value": 0,"text": '0℃' },{ "value": 1,"text": '50℃' },{ "value": 2,"text": '100℃' },{ "value": 3,"text": '150℃' },
		{ "value": 4,"text": '200℃' },{ "value": 5,"text": '250℃' },{ "value": 6,"text": '300℃' },{ "value": 7,"text": '350℃' },
		{ "value": 8,"text": '400℃' },{ "value": 9,"text": '450℃' },{ "value": 10,"text": '500℃' },{ "value": 11,"text": '550℃' },
		{ "value": 12,"text": '600℃' },{ "value": 13,"text": '650℃' },{ "value": 14,"text": '700℃' },{ "value": 15,"text": '750℃' },
		{ "value": 16,"text": '800℃' },{ "value": 17,"text": '850℃' },{ "value": 18,"text": '900℃' },{ "value": 19,"text": '950℃' },
		{ "value": 20,"text": '1000℃' },
	],
	RANGEMIN_RTD:[
		{ "value": 0,"text": '0℃' },{ "value": 1,"text": '-50℃' },	{ "value": 2,"text": '-100℃' }
	],
	SENSOR_RTD:[
		{ "value": 0,"text": 'PT100' },{ "value": 1,"text": 'PT1000' },{ "value": 2,"text": '热电偶' }
	],
	ANALOGRANGE_RTD:[
		{ "value": 0,"text": '0-10V',"checked": 'true'},{ "value": 1,"text": '0-5V' },{ "value": 2,"text": '4-20mA' }	
	],
	RUNMODE_ZDBL:[
		{ "value": 0,"text": 'PWM模式' },
		{ "value": 1,"text": '电压模式' },	
		{ "value": 2,"text": '电流模式' },
		{ "value": 3,"text": '速度模式' },
		{ "value": 4,"text": '绝对位置模式' },	
		{ "value": 5,"text": '相对位置模式' },
		{ "value": 6,"text": '负载模式' },
		{ "value": 7,"text": '再生制动模式' },
		{ "value": 8,"text": '加速模式' },	
		{ "value": 9,"text": '扭振模式' }
	],
	SOURCE_IN:[
		{ "value": 0,"text": 'BUS' },
		{ "value": 1,"text": 'ADC' },	
		{ "value": 2,"text": 'PWM' },
		{ "value": 3,"text": 'PULSE' }		
	],
	SOURCE_DIR:[
		{ "value": 0,"text": '根据自身数据' },
		{ "value": 1,"text": '总为正' },	
		{ "value": 2,"text": 'CH1' },
		{ "value": 3,"text": 'CH2' },
		{ "value": 4,"text": 'CH1CH2' },
		{ "value": 5,"text": 'CH2CH1' },
	],
	SOURCE_START:[
		{ "value": 0,"text": 'BUS' },
		{ "value": 1,"text": '一直启动' },	
		{ "value": 2,"text": '自身数据' },
		{ "value": 3,"text": 'CH1' },
		{ "value": 4,"text": 'CH2' },
		{ "value": 5,"text": 'CH1_2' },
	],
	TRACK:[
		{ "value": 0,"text": '无轨迹' },
		{ "value": 1,"text": '低通滤波' },	
		{ "value": 2,"text": '线性轨迹1' },
		{ "value": 3,"text": '线性轨迹2' },
		{ "value": 4,"text": '贝塞尔曲线' },
		{ "value": 5,"text": '3段式曲线' },
	]
}
export const tool = {
	getCRC16:(arr,len)=>{			//CRC校验
		let index;
		let i = 0;
		let crch = 0xff;
		let crcl = 0xff;	
		while(len--){
			index = crch ^ (arr[i++]&0xff);		
			crch = crcl ^ parameters.TABH[index];
			crcl = parameters.TABL[index];		
		}
		return ((crch<<8) | crcl);
	},
	decimal:(e)=>{
		switch(e){
			case -5:console.log(e);				
			return 100000;
			case -4:console.log(e);
			return 10000;
			case -3:console.log(e);
			return 1000;
			case -2:console.log(e);
			return 100;
			case -1:console.log(e);
			return 10;
			case 0:console.log(e);
			return 1;
			case 1:console.log(e);
			return 0.1;
			case 2:console.log(e);
			return 0.01;
			case 3:console.log(e);
			return 0.001;
			case 4:console.log(e);
			return 0.0001;
			case 5:console.log(e);
			return 0.00001; 
		}
	},
	arrSum:(arr)=>{				//数组求和
		let sum = 0;
		arr.forEach(function(item){
			sum += item;
		});
		return sum;
	},
	compare:(key)=>{				//排序
		return function(a,b){
			return a[key]-b[key];//升序，降序为b[key]-a[key]
		}
	},
	getArrDifference:(arr1,arr2)=>{
		return arr1.concat(arr2).filter(function(v,i,arr){
			return arr.indexOf(v) === arr.lastIndexOf(v)
		})
	},
	getArrEqual:(arr1,arr2)=>{
		let newArr = [];
		for(let i = 0; i < arr2.lenght; i++){
			for(let j = 0; j < arr1.lenght; j++){
				if(arr1[j] === arr2[i]){
					newArr.push(arr1[j]);
				}
			}
		}
		return newArr;
	},
	getNewArr:(arrs)=>{
		let newArr = arrs.map(item=>{
			let curkey = Object.keys(item)
			return item[curkey[0]]
		})
		return newArr
	},
	getObjectValues:(object)=>{	//取对象的值
		let values = [];
		for(var property in object)
		values.push(object[property]);
		return values;
	},
	getObjectKeys:(object)=>{      //取对象的键
		let Keys = [];
		for(var property in object)
		Keys.push(property);
		return Keys;
	},
	composeArray:(array,key)=>{    //取数据对象里key对应的值
		let params =[];
		for(let items of array){
			params.push(items[key]);
		}
		return params
	},
	isExistArr:(arr1,arr2)=>{		//判断arr2的元素是否存在于arr1中
		let newArr = []	
		arr1.forEach(function(item,index){		
			if(arr2.indexOf(item) == -1){
				newArr.push(item)			
			}
		})
		return newArr;
	},	
	abConcat:(resultConstructor, ...arrays)=>{
		let totalLength = 0;
		for (let arr of arrays) {		
			totalLength += arr.byteLength;
		}	
		let result = new resultConstructor(totalLength);
		let offset = 0;
		for (let arr of arrays) {
			let u8 = new resultConstructor(arr)
			result.set(u8, offset);
			offset += arr.byteLength;		
		}
		return result;
	},
	inArray:(arr, key, val)=>{	//为了去除重复的
	  for (let i = 0; i < arr.length; i++) {
		if (arr[i][key] === val) {
		  return i;
		}
	  }
	  return -1;
	},
	myMax:(n1, n2)=>{				//比大小
	  return Math.max(n1, n2)
	},
	myLen:(arr)=>{				//比长度
		arr = arr || []
		return arr.length
	},
	isJSON(str){
		try{
			JSON.parse(str)
			return true
		}catch(e){
			return false
		}
	}
}
export const converter = {
	hex2int:(hex)=>{				//将16进制字符串转换为10进制
		var len = hex.length, a = new Array(len), code;
		for (var i = 0; i < len; i++) {
			code = hex.charCodeAt(i);
			if (48<=code && code < 58) {
				code -= 48;
			} else {
				code = (code & 0xdf) - 65 + 10;
			}
			a[i] = code;
		}
		return a.reduce(function(acc, c) {
			acc = 16 * acc + c;
			return acc;
		}, 0);
	},	
	hex2ab:(hex)=> {			// ArrayBuffer转16进度字符串示例
	  // 去除前缀和空格，统一小写
	    hex = hex.replace(/^0x/, '').replace(/\s/g, '').toLowerCase();
	    if (hex.length % 2 !== 0) throw new Error("Hex字符串长度必须为偶数");  
	    const bytes = new Uint8Array(hex.split('').reduce((acc, curr, idx) => {
	      if (idx % 2 === 0) acc.push(parseInt(hex[idx] + hex[idx+1], 16));
	      return acc;
	    }, []));
	    return bytes.buffer;
	},
	ab2hex:(buffer)=> {			// ArrayBuffer转16进度字符串示例
	  var hexArr = Array.prototype.map.call(
		new Uint8Array(buffer),
		function (bit) {
		  return ("00" + bit.toString(16)).slice(-2);
		}
	  );
	  return hexArr.join("");
	},
	ab2str:(buffer)=>{
		if (typeof TextDecoder !== 'undefined') {
			return new TextDecoder('utf-8').decode(buffer);
		}
		// 降级方案
		return String.fromCharCode.apply(null, new Uint8Array(buffer));
	},
	str2ab:(str)=>{
		const buffer = new ArrayBuffer(str.length)
		const dataView = new DataView(buffer);
		for (let i = 0; i < str.length; i++) {
			dataView.setUint8(i, str.charCodeAt(i));
		}
		console.log(buffer,'buffer')
		return buffer
	},	
	ab2s16:(a,b)=>{			//数组转int16
		let buffer = new ArrayBuffer(4);
		let u8 = new Uint8Array(buffer);
		let s16 = new Int16Array(buffer);
		u8[0] = b;
		u8[1] = a;		
		return s16[0];
	},
	ab2s32:(a,b,c,d)=>{			//数组转int32
		let buffer = new ArrayBuffer(4);
		let u8 = new Uint8Array(buffer);
		let s32 = new Int32Array(buffer);
		u8[0] = d;
		u8[1] = c;
		u8[2] = b;
		u8[3] = a;
		return s32[0];
	},
	ab2s64:(a,b,c,d,e,f,g,h)=>{			//数组转int64
		let buffer = new ArrayBuffer(8);
		let u8 = new Uint8Array(buffer);
		let s64 = new BigInt64Array(buffer);		
		u8[0] = h;
		u8[1] = g;
		u8[2] = f;
		u8[3] = e;
		u8[4] = d;
		u8[5] = c;
		u8[6] = b;
		u8[7] = a;
		return s64[0];
	},
	ab2float:(a,b,c,d)=>{			//数组转float
		let buffer = new ArrayBuffer(4);
		let u8 = new Uint8Array(buffer);
		let f32 = new Float32Array(buffer);
		u8[0] = d;
		u8[1] = c;
		u8[2] = b;
		u8[3] = a;
		return f32[0];
	},
	float2ab:(float)=>{			//float转数组
		let buffer = new ArrayBuffer(4);
		let u16 = new Uint16Array(buffer);
		let f32 = new Float32Array(buffer);
		f32[0] = float;
		return [u16[1],u16[0]];
	},	
	s162ab:(e)=>{			//int16转数组
		let buffer = new ArrayBuffer(4);
		let u16 = new Uint16Array(buffer);
		let s16 = new Int16Array(buffer);
		s16[0] = e;
		return u16[0];
	},
	s322ab:(e)=>{			//int32转数组
		let buffer = new ArrayBuffer(4);
		let u16 = new Uint16Array(buffer);
		let s32 = new Int32Array(buffer);
		s32[0] = e;
		return [u16[1],u16[0]];
	}
}
export const fileEncryptor = {
	decodeZnf:(znfData) => {
	  const result = new Uint8Array(znfData.length);
	  for (let i = 0; i < znfData.length; i++) {
	    const ency = i % 255;
	    result[i] = (znfData[i] - ency)&0xFF;
	  }
	  return result;
	},
	encodeBin:(binData) => {
	  const result = new Uint8Array(binData.length);
	  for (let i = 0; i < binData.length; i++) {
	    const ency = i % 255;
	    result[i] = (binData[i] + ency)&0xFF;
	  }	  
	  return result;
	}
}
